/**
 * @author   zhangyp
 * @created  2013-9-13 下午4:08:49
 * @email    zviolet@163.com
 * TODO      百度地图点击事件监听
 */
package com.bible.fire.api.baidumap;

import com.baidu.mapapi.map.MKMapTouchListener;
import com.baidu.platform.comapi.basestruct.GeoPoint;
import com.bible.fire.local.AppContext;
import com.bible.fire.util.ToastUtil;

public class BaiduMapMKTouchListener implements MKMapTouchListener {

	@Override
	public void onMapClick(GeoPoint point) {
		showGeoMsgWhenClick( point );
	}

	@Override
	public void onMapDoubleClick(GeoPoint point) {
		showGeoMsgWhenClick( point );
	}

	@Override
	public void onMapLongClick(GeoPoint point) {
		showGeoMsgWhenClick( point );
	}
	
	private static void showGeoMsgWhenClick(GeoPoint point){
		String msg = String.format( "当前经度 ： %f 当前纬度：%f",point.getLongitudeE6()*1E-6,point.getLatitudeE6()*1E-6);
		ToastUtil.showMsg(AppContext.getContext(), msg);
	}

}
